#pragma once

#include <QListWidget>
#include <QPushButton>
#include <QCheckBox>
#include <QLabel>
#include <QGroupBox>

#include <QHBoxLayout>
#include <QVBoxLayout>

#include "header.h"

class GenResult : public QWidget
{
    Q_OBJECT
public:
    explicit GenResult(QVector<int> vResults, QWidget *parent = nullptr);
    ~GenResult() override = default;

    void updateLabel(int index);

private slots:
    void onShowAll();

private:
    QVector<int> vResults;

    QCheckBox *cbbShowLeft = new QCheckBox("显示前一个");
    QCheckBox *cbbShowRight = new QCheckBox("显示后一个");
    QLabel *labelCurrentIndex = new QLabel;
    QLabel* labels[3] { new QLabel, new QLabel, new QLabel };
    QPushButton *btnPrev = new QPushButton("前一个");
    QPushButton *btnNext = new QPushButton("后一个");
    QPushButton *btnShowAll = new QPushButton("显示全部");
    QPushButton *btnClose = new QPushButton("关闭");

    int current = 0;
};
